import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text("卡片"), // 标题
          leading: Icon(Icons.menu), // 左侧图标
          actions: [Icon(Icons.settings)],  // 右侧图标数组
          elevation: 0.0,// 去掉阴影
          centerTitle: true, // 标题居中

        ),
        body:CardDemo()
    );
  }
}

class CardDemo extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Card(
          margin: EdgeInsets.all(30),
          color: Colors.purpleAccent[100],
          shadowColor: Colors.yellow,
          elevation: 20,
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(40),
            side: BorderSide(
              color: Colors.yellow,
              width: 3
            )
          ),
          child: Column(
            children: [
              ListTile(
                leading: Icon(
                  Icons.supervised_user_circle_rounded,
                  size: 50,
                ),
                title: Text(
                  "张三",
                  style: TextStyle(
                    fontSize: 30
                  ),
                ),
                subtitle: Text(
                  "懂事长",
                  style: TextStyle(
                    fontSize: 20
                  ),
                ),
              ),
              ListTile(
                title: Text(
                  "电话：13xxxxxx",
                  style: TextStyle(
                      fontSize: 20
                  ),
                ),
              ),
              ListTile(
                title: Text(
                  "地址：00000000",
                  style: TextStyle(
                      fontSize: 20
                  ),
                ),

              ),

            ],
          ),
        ),
        Card(
          child: Column(
            children: [
              ListTile(
                leading: Icon(
                  Icons.supervised_user_circle_rounded,
                  size: 50,
                ),
                title: Text(
                  "李四",
                  style: TextStyle(
                      fontSize: 30
                  ),
                ),
                subtitle: Text(
                  "总经理",
                  style: TextStyle(
                      fontSize: 20
                  ),
                ),
              ),
              ListTile(
                title: Text(
                  "电话：13xxxxxx",
                  style: TextStyle(
                      fontSize: 20
                  ),
                ),
              ),
              ListTile(
                title: Text(
                  "地址：00000000",
                  style: TextStyle(
                      fontSize: 20
                  ),
                ),

              ),

            ],
          ),
        )
      ],
    );
  }
}
